package io.sage.modules.goods.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import io.sage.modules.goods.entity.BGoods;
import io.sage.modules.goods.entity.BGoodsExample;
import org.springframework.stereotype.Repository;

@Repository
public interface BGoodsMapper {
    int countByExample(BGoodsExample example);

    int deleteByExample(BGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(BGoods record);

    int insertSelective(BGoods record);

    List<BGoods> selectByExample(BGoodsExample example);

    BGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") BGoods record, @Param("example") BGoodsExample example);

    int updateByExample(@Param("record") BGoods record, @Param("example") BGoodsExample example);

    int updateByPrimaryKeySelective(BGoods record);

    int updateByPrimaryKey(BGoods record);

    /**
     * 货物列表
     * @param params
     * @return
     */
    List<BGoods> selectGoodsList(Map<String, Object> params);

    /**
     * 货物列表
     * @param id
     * @return
     */
    BGoods selectGoodsById(Integer id);
    /**
     * 批量删除
     * @param ids
     * @return
     */
    int deleteBatchIds(Integer[] ids);


    int updateStatusByIds(@Param("example") BGoodsExample example);

    int updateUpShelfBatch(List<BGoods> list);

    Integer selectNewCount(Map<String, Object> params);
}